package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BizDataQuantityMapper;
import com.ruoyi.system.domain.BizDataQuantity;
import com.ruoyi.system.service.IBizDataQuantityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 质量管控Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-29
 */
@Service
public class BizDataQuantityServiceImpl implements IBizDataQuantityService 
{
    @Autowired
    private BizDataQuantityMapper bizDataQuantityMapper;

    /**
     * 查询质量管控
     * 
     * @param id 质量管控主键
     * @return 质量管控
     */
    @Override
    public BizDataQuantity selectBizDataQuantityById(Long id)
    {
        return bizDataQuantityMapper.selectBizDataQuantityById(id);
    }

    /**
     * 查询质量管控列表
     * 
     * @param bizDataQuantity 质量管控
     * @return 质量管控
     */
    @Override
    public List<BizDataQuantity> selectBizDataQuantityList(BizDataQuantity bizDataQuantity)
    {
        return bizDataQuantityMapper.selectBizDataQuantityList(bizDataQuantity);
    }

    /**
     * 新增质量管控
     * 
     * @param bizDataQuantity 质量管控
     * @return 结果
     */
    @Override
    public int insertBizDataQuantity(BizDataQuantity bizDataQuantity)
    {
        bizDataQuantity.setCreateTime(DateUtils.getNowDate());
        return bizDataQuantityMapper.insertBizDataQuantity(bizDataQuantity);
    }

    /**
     * 修改质量管控
     * 
     * @param bizDataQuantity 质量管控
     * @return 结果
     */
    @Override
    public int updateBizDataQuantity(BizDataQuantity bizDataQuantity)
    {
        return bizDataQuantityMapper.updateBizDataQuantity(bizDataQuantity);
    }

    /**
     * 批量删除质量管控
     * 
     * @param ids 需要删除的质量管控主键
     * @return 结果
     */
    @Override
    public int deleteBizDataQuantityByIds(String ids)
    {
        return bizDataQuantityMapper.deleteBizDataQuantityByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除质量管控信息
     * 
     * @param id 质量管控主键
     * @return 结果
     */
    @Override
    public int deleteBizDataQuantityById(Long id)
    {
        return bizDataQuantityMapper.deleteBizDataQuantityById(id);
    }
}
